<!DOCTYPE html>
<html>
<header>
	<title>
		<%
			out.print("My Page");
		%>
	</title>
	<link rel="stylesheet" type="text/css" href="./template/css/my.css">
	</head>
	<body>
		<div id="body">
			<div id="header">

				<tr>
					<td>

						<div style="float: right">

							<%
								String uri = request.getRequestURI();
								String pageName = uri.substring(uri.lastIndexOf("/") + 1);

								String userId = (String) session.getAttribute("userid");
								if ((userId == null) || (userId == "") && !"index.jsp".equals(pageName)) {
							%>
								<a href="index.jsp">Log in...</a>
							<%
							} else {
							%>
							<%=session.getAttribute("userid")%>
							<a href="logout">Log out...</a>
							<%
								}
							%>
						</div> <%
 	out.print("WELCOME TO MY PAGE!");
 %>
					</td>
				</tr>
			</div>